#define _CRT_SECURE_NO_WARNINGS 1
#include "SList.h"

void TestSLT()
{
	/*SLTNode* n1 = BuySLTNode(1);
	SLTNode* n2 = BuySLTNode(2);*/
	//SLTNode* plist = createSList(4);
	SLTNode* plist = NULL;
	SLTPushBack(&plist, 10);
	SLTPushBack(&plist, 20);
	SLTPushBack(&plist, 30);
	SLTPushBack(&plist, 40);
	SLTPushBack(&plist, 50);
	SLTprint(plist);

	SLTPopBack(&plist);
	SLTprint(plist);

	SLTPushFront(&plist, 40);
	SLTprint(plist);

	SLTPopFront(&plist);
	SLTprint(plist);

	SLTPopBack(&plist);
	SLTprint(plist);

	SLTPopFront(&plist);
	SLTprint(plist);

	SLTNode* p = SLTFind(plist, 20);
	SLInsertAfter(p, 30);
	SLTprint(plist);

	p = SLTFind(plist, 20);
	SLInsert(&plist, p, 10);
	SLTprint(plist);

	SLTEraseAfter(p);
	SLTprint(plist);

	SLTErase(&plist,p);
	SLTprint(plist);
	SLTDestroy(&plist);

}

int main()
{
	TestSLT();
	return 0;
}